package design_pattern.observer.demo_sendMsg;

public class HolderTypeOne implements MsgHolder {
    private String holderName;
    private Msg msg;
    
    public HolderTypeOne(String name){
	holderName = name;
    }
    @Override
    public void getMsg(Msg msg) {
	this.msg = msg;
	System.out.println(this);
    }
    
    @Override
    public String toString() {
	String result = this.holderName + "    ||    HolderTypeOne    ||    " + this.msg;
        return result;
    }

}
